package com.itany.corejava.code07_常用类.日期类;

import java.util.Date;

/**
 * @author MissChen
 * @date 2024年03月01日 14:52
 */
public class Test01_定义方式 {
    public static void main(String[] args) {
        Date date=new Date();//获取当前日期
        System.out.println(date);

        //Jan  Feb  Mar   April  May  June  July  August   Sep   Oct   Nov   Dec
        //Mon   Tue   Wed  Thurs   Fri   Sat   Sun
        Date date2=new Date(0);
        System.out.println(date2);


        //过时，不建议使用
        Date date3=new Date(2024,4,27);
        System.out.println(date3);

        //源码中年份+1900
        //月份0-11
        Date date4=new Date(2024-1900,4,27);
        System.out.println(date4);
    }
}
